<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page isErrorPage="true" %>
<%@ page import="bbs2.model.*, bbs2.dao.*, bbs2.service.*, bbs2.util.*" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="../_header.jsp" %>  
<style>
    form > div { margin-top: 20px; }
</style>
</head>
<%
User user = UserService.getCurrentUser(session);
int userID = (user == null) ? 0 : user.getId();
String IP = request.getRemoteAddr();
String URL = request.getAttribute("javax.servlet.error.request_uri") + "?" + 
             request.getAttribute("javax.servlet.forward.query_string");
LogDAO.insert(userID, IP, URL, exception);
%>
<body>
<%@ include file="../_menu.jsp" %>  

<div class="container">
    <h1>에러 발생</h1>
    <hr />
    
    <div class="alert alert-error">
        처리 도중 에러가 발생했습니다. <br />
        <%= exception.getMessage() %>        
    </div>
    
</div>

<%@ include file="../_footer.jsp" %>  
</body>
</html>
